package com.gy.def.exception;

import com.gy.def.enums.ResultEnum;
import lombok.Getter;

@Getter
public class GySchoolException extends RuntimeException {

  private static final long serialVersionUID = -7895699478230959923L;
  private Integer code;

  public GySchoolException(ResultEnum resultEnum) {
    super(resultEnum.getMessage());
    this.code = resultEnum.getCode();
  }

  public GySchoolException(Integer code, String message) {
    super(message);
    this.code = code;
  }

}
